package com.swift.authority.mapper.user;


import com.swift.authority.core.user.dto.UserDto;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Administrator
 * @description :
 * @date 2022/06/17 21:45
 * @since open jdk 1.8
 */
@Mapper
public interface UserMapper {
    /**
     * @description  用户注册
     * @param user 当前用户
     */
    @Transactional(rollbackFor = Exception.class)
    public void userAdd(UserDto  user);
    /**
     * @description 根据id查询用户信息
     * @param id id
     * @return User
     */
   public UserDto queryUserInfoById(int id);

    /**
     * @description 根据用户名判断用户是否存在
     * @param userName 用户名
     * @return Boolean
     */
   public UserDto queryUserByUserName(String userName);
}
